<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
    <title>图书管理系统</title>
</head>
<body>
<h1 align="center">书籍库</h1>

<table border="1" cellpadding="0" cellspacing="0" width="300" height="50" align="center">
    <tr>
        <td>id</td>
        <td>书名</td>
        <td>价格</td>
        <td>数量</td>
        <td>删除</td>
        <td>更新</td>
    </tr>
    <c:forEach var="books" items="${BooksList}">
        <tr>
            <td>${books.id}</td>
            <td>${books.name}</td>
            <td>${books.price}</td>
            <td>${books.amount}</td>
            <td>
                <a href="${pageContext.request.contextPath}/deletebooks?id=${books.id}">删除</a>
            </td>
            <td>
                <a href="${pageContext.request.contextPath}/updatabooks?id=${books.id}&name=${books.name}&price=${books.price}&amount=${books.amount}}">更新</a>
            </td>
        </tr>
    </c:forEach>

</table>
</body>
</html>
